import { IS_ONLINE } from './app'
import { timeFormat } from '@/utils/time'

const OSS_DIR = `order-admin/${IS_ONLINE ? 'online' : 'test'}`

export const OSS_URL = 'https://img2.zihaiguo.com' + OSS_DIR

export const UPLOAD_DIR = () => {
  const dirName = timeFormat(Date.now(), 'YYYYMMDD')
  return `${OSS_DIR}/upload/${dirName}/`
}
